<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        
        .box{
            width: 100px;
            height: 100px;
            padding: 30px;
            background-color: bisque;
            /* 将元素隐藏 ，隐藏后不占页面空间*/
            /* display: none; */

            /* 将元素隐藏 ,隐藏后仍占空间*/
            visibility: hidden;
        }
        .box .item{
            width: 50px;
            height: 50px;
            background-color: blueviolet;
            visibility: visible;

        }
    </style>
</head>
<body>
    
    <div class="box">
        display隐藏
        <div class="item">
            子元素
        </div>
    </div>
    <h3>我是h3</h3>
</body>
</html>